﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ProjectSem3.Admin
{
    public partial class WebForm6 : System.Web.UI.Page
    {
        private dataDataContext dc = new dataDataContext();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                loaddata();
            }
        }

        protected void listView1_PagePropertiesChanging(object sender, PagePropertiesChangingEventArgs e)
        {
            DataPager1.SetPageProperties(e.StartRowIndex, 8, false);
            loaddata();
        }

        protected void listView1_PagePropertiesChanged(object sender, EventArgs e)
        {
            
        }
        private void loaddata()
        {
            listView1.DataSource = dc.Products.OrderByDescending(a => a.Status).ToList();
            listView1.DataBind();
        }
        

        protected void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }
    }
}